<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>036-自定义列队动画.html</title>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		div{
			width: 100px;
			height: 100px;
			background-color: red;
			margin-top: 10px;
		}
	</style>
</head>
<body>
	<button>开始动画</button>
	<div></div>
	<div></div>
</body>
<script src="js/jquery-1.12.4.js"></script>
<script>
	$(function(){
		$('button').on('click',function(){
			
			$('div').animate({width:200},1000,function(){
				console.log('width done')
			});
			$('div').animate({height:200},1000,function(){
				console.log('height done')
			});
			$('div').animate({opacity:0.5},1000,function(){
				console.log('opacity done')
			});
			/*
			$('div').animate({width:200},1000,function(){
				$('div').animate({height:200},1000,function(){
					$('div').animate({opacity:0.5},1000,function(){
						alert('done');
					});
				});
			});
			*/
			// console.log($('div').animate({width:200},1000));
			/*
			$('div')
			.animate({width:200},1000,function(){
				console.log('width done')
			})
			.animate({height:200},1000,function(){
				console.log('height done')
			})
			.animate({opacity:0.5},1000,function(){
				console.log('opacity done')
			});
			*/
		});
	})
</script>
</html>